<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class ArticlePraise extends Model
{
    //表名
    protected $table = 'article_praise';

    //主键
    protected $primaryKey = 'id';

    //时间戳
    public $timestamps = false;

    //判断是否存在
    public static function check_praise_status($article_id = 0, $session_id = ''){
        $praise_status = self::where('article_id', $article_id)->where('session_id', $session_id)->first();
        return $praise_status;
    }
}
